using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class gal_ticketremMap : EntityTypeConfiguration<gal_ticketrem>
    {
        public gal_ticketremMap()
        {
            // Primary Key
            this.HasKey(t => t.id);

            // Properties
            this.Property(t => t.SectionString)
                .HasMaxLength(500);

            this.Property(t => t.SECTION_LABEL)
                .IsFixedLength()
                .HasMaxLength(3);

            this.Property(t => t.FREEFORM_REMARKS)
                .IsFixedLength()
                .HasMaxLength(22);

            // Table & Column Mappings
            this.ToTable("gal_ticketrem");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.reference).HasColumnName("reference");
            this.Property(t => t.SectionString).HasColumnName("SectionString");
            this.Property(t => t.MIR).HasColumnName("MIR");
            this.Property(t => t.SECTION_LABEL).HasColumnName("SECTION LABEL");
            this.Property(t => t.FREEFORM_REMARKS).HasColumnName("FREEFORM REMARKS");
        }
    }
}
